package com.ai.common.api;

import com.ai.common.vo.UserVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "MICROSERVICEPROVIDER")
public interface EurekaOldApi {

    @GetMapping("/serviced/user/{id}")
    String findById(@PathVariable("id") String id);

    @PostMapping("/serviced/user/add")
    boolean add(@RequestBody UserVo userVo);

    @GetMapping("/serviced/user/findAll/{current}/{limit}")
    Page<UserVo> findAll(@PathVariable("current") Long current, @PathVariable("limit") Long limit);

    @DeleteMapping("/serviced/user/{id}")
    public boolean delete(@PathVariable("id") String id);

    @PostMapping("/serviced/user/update")
    public boolean update(@RequestBody UserVo userVo);
}
